package com.ruoyi.hcmain.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hcmain.mapper.HcPrichMapper;
import com.ruoyi.hcmain.domain.HcPrich;
import com.ruoyi.hcmain.service.IHcPrichService;

/**
 * 价格Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-12
 */
@Service
public class HcPrichServiceImpl implements IHcPrichService 
{
    @Autowired
    private HcPrichMapper hcPrichMapper;

    /**
     * 查询价格
     * 
     * @param prichId 价格主键
     * @return 价格
     */
    @Override
    public HcPrich selectHcPrichByPrichId(Long prichId)
    {
        return hcPrichMapper.selectHcPrichByPrichId(prichId);
    }

    /**
     * 查询价格列表
     * 
     * @param hcPrich 价格
     * @return 价格
     */
    @Override
    public List<HcPrich> selectHcPrichList(HcPrich hcPrich)
    {
        return hcPrichMapper.selectHcPrichList(hcPrich);
    }

    /**
     * 新增价格
     * 
     * @param hcPrich 价格
     * @return 结果
     */
    @Override
    public int insertHcPrich(HcPrich hcPrich)
    {

        hcPrich.setCreateTime(DateUtils.getNowDate());
        return hcPrichMapper.insertHcPrich(hcPrich);
    }

    /**
     * 修改价格
     * 
     * @param hcPrich 价格
     * @return 结果
     */
    @Override
    public int updateHcPrich(HcPrich hcPrich)
    {
        return hcPrichMapper.updateHcPrich(hcPrich);
    }

    /**
     * 批量删除价格
     * 
     * @param prichIds 需要删除的价格主键
     * @return 结果
     */
    @Override
    public int deleteHcPrichByPrichIds(Long[] prichIds)
    {
        return hcPrichMapper.deleteHcPrichByPrichIds(prichIds);
    }

    /**
     * 删除价格信息
     * 
     * @param prichId 价格主键
     * @return 结果
     */
    @Override
    public int deleteHcPrichByPrichId(Long prichId)
    {
        return hcPrichMapper.deleteHcPrichByPrichId(prichId);
    }
}
